﻿using System;
using System.Text;

class ConvertStringToUnicodeCharLiterals
{
    static void Main()
    {
        //Exercise 10.
        //Write a program that converts a string to a sequence of C# Unicode character literals. Use format strings. 
        //Sample input:  Hi!
        //Expected output: \u0048\u0069\u0021

        //Sample: Наков
        //Резултат: "\u041d\u0430\u043a\u043e\u0432"

        string text = "Наков";
        StringBuilder result = new StringBuilder();
        for (int i = 0; i < text.Length; i++)
        {
            result.AppendFormat("\\u{0:x4}", (int)text[i]);            
        }
        Console.WriteLine(result);        
    }
}

